# coding=gbk

from datetime import date, timedelta
from testscript.case import *
from Reporting.TradeReport import *
#from Misc.Utils import update_stock_static_info_from_vendor

def test_report_trade():
	#update_stock_static_info_from_vendor()
	#test_case()
	
	start_date = date(2011, 9, 26)
	end_date = date(2011, 9, 28)
	ticks = ['600143','08102']
	portfs = None #['SC001']
	
	r = query_trade(start_date, end_date, ticks, portfs)
	#print r
	
	#pp = pprint.PrettyPrinter(indent=4, depth=2)
	#pp.pprint(r)
	
	with open('D:/work/pke/testcases/test_report_trade.log', 'w') as log_file: 
		for line in r:
			log_file.write(str(line))
			log_file.write('\n')
	
	
	
	
	